Component({
	data: {
		selected: 0,
		color: "#A5ACBF",
		selectedColor: "#101010",
		"list": [{
				"pagePath": "pages/index/index",
				"text": "首页",
				"iconPath": "/static/image/tabbar/home.png",
				"selectedIconPath": "/static/image/tabbar/home.active.png"
			},
			{
				"pagePath": "pages/message/message",
				"text": "消息",
				"iconPath": "/static/image/tabbar/message.png",
				"selectedIconPath": "/static/image/tabbar/message.active.png"
			},
			{
				"pagePath": "pages/mine/mine",
				"text": "我的",
				"iconPath": "/static/image/tabbar/mine.png",
				"selectedIconPath": "/static/image/tabbar/mine.active.png"
			}
		],
		messageCount: 0
	},
	attached() {
	},
	methods: {
		switchTab(e) {
			const data = e.currentTarget.dataset
			const url = data.path
			wx.switchTab({
				url: `/${url}`
			})
			this.setData({
				selected: data.index
			})
		}
	}
})